home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / FilenameFilter.java < prev    next >
Text File  |  1998-09-22  |  2KB  |  45 lines

  1. /*
  2.  * @(#)FilenameFilter.java    1.15 98/07/01
  3.  *
  4.  * Copyright 1995-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.io;
  16.  
  17. /**
  18.  * Instances of classes that implement this interface are used to 
  19.  * filter filenames. These instances are used to filter directory 
  20.  * listings in the <code>list</code> method of class 
  21.  * <code>File</code>, and by the Abstract Window Toolkit's file 
  22.  * dialog component. 
  23.  *
  24.  * @author  Arthur van Hoff
  25.  * @author  Jonathan Payne
  26.  * @version 1.15, 07/01/98
  27.  * @see     java.awt.FileDialog#setFilenameFilter(java.io.FilenameFilter)
  28.  * @see     java.io.File
  29.  * @see     java.io.File#list(java.io.FilenameFilter)
  30.  * @since   JDK1.0
  31.  */
  32. public
  33. interface FilenameFilter {
  34.     /**
  35.      * Tests if a specified file should be included in a file list.
  36.      *
  37.      * @param   dir    the directory in which the file was found.
  38.      * @param   name   the name of the file.
  39.      * @return  <code>true</code> if the name should be included in the file
  40.      *          list; <code>false</code> otherwise.
  41.      * @since   JDK1.0
  42.      */
  43.     boolean accept(File dir, String name);
  44. }
  45.